#include <cstdio>
#include <stdarg.h>
#include "OsSupport.h"
namespace Support {
	void ErrorReportPrintf::handle(int error_type, const char* format, ...){
		va_list args;
		switch (error_type) {
		case SOVED:
			TERMINAL_COLOR(eTerminalColor::warning) {
				printf("SOVED:");
				va_start(args, format);
				vprintf(format, args);
				va_end(args);
				printf("\n");
			}
			break;
		case CRASH:
			TERMINAL_COLOR(eTerminalColor::error) {
				printf("CRASH:");
				va_start(args, format);
				vprintf(format, args);
				va_end(args);
				printf("\n");
			}
			break;
		case FROM_LOW:
			TERMINAL_COLOR(eTerminalColor::warning) {
				printf("FROM_LOW:");
				va_start(args, format);
				vprintf(format, args);
				va_end(args);
				printf("\n");
			}
			break;
		default:
			TERMINAL_COLOR(eTerminalColor::warning) {
				printf("ERROR%d:", error_type);
				va_start(args, format);
				vprintf(format, args);
				va_end(args);
				printf("\n");
			}
			break;
		}
		return;
	};
	ErrorReportPrintf error_reporter_printf_delegate;
}